platform :ios, '12.0'
use_frameworks!
#use_modular_headers!

project 'fcm-push.xcodeproj'

pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Messaging'

# Specify stable gRPC versions
pod 'gRPC-Core', '~> 1.44.0'
pod 'gRPC-C++', '~> 1.44.0'

target 'fcm-push' do
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'BoringSSL-GRPC'
          target.source_build_phase.files.each do |file|
            if file.settings && file.settings['COMPILER_FLAGS']
              flags = file.settings['COMPILER_FLAGS'].split
              flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
              file.settings['COMPILER_FLAGS'] = flags.join(' ')
            end
          end
        end
        target.build_configurations.each do |config|
          if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
            target.build_configurations.each do |config|
                config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
            end
          end
        end
    end
end
